package com.sendpo.zjx.sendpo.views;

import android.content.Context;
import android.support.annotation.Px;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;

/**
 * Created by 朱俊鑫 on 2017/7/4.
 * information 自定义主界面里面的切换组件
 */

public class MainViewpager extends ViewPager {
    public boolean isScroll() {
        return isScroll;
    }

    public void setScroll(boolean scroll) {
        isScroll = scroll;
    }

    public boolean isScroll=false;

    public MainViewpager(Context context) {
        super(context);
    }

    public MainViewpager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }


    @Override
    public void scrollTo(@Px int x, @Px int y) {
         if(isScroll){
             super.scrollTo(x, y);
         }

    }
}
